<template>
  <div id="namelessChange">
    <el-collapse v-model="activeNames1">
      <el-collapse-item title="内容样式" name="1">
        <ul class="content-list">
          <li>
            <span>提示文字：</span>
            <div>
              <el-input
                size="small"
                type="text"
                placeholder="请输入内容"
                v-model="styles.text"
                maxlength="10"
                show-word-limit
                style="width: 350px"
              />
            </div>
          </li>
          <li>
            <span>文字对齐：</span>
            <div>
              <el-button-group>
                <el-button size="mini" @click="styles.wordStatus='left'" type plain>
                  <svg style="font-size:16px" class="icon" aria-hidden="true">
                    <use xlink:href="#iconjuzuoduiqi" />
                  </svg>
                </el-button>
                <el-button size="mini" @click="styles.wordStatus='center'" type plain>
                  <svg style="font-size:16px" class="icon" aria-hidden="true">
                    <use xlink:href="#iconjuzhongduiqi" />
                  </svg>
                </el-button>
              </el-button-group>
            </div>
          </li>
          <li>
            <span>文字颜色：</span>
            <div>
              <colorSetting v-model="styles.colorWord" :originColor="styles.colorWord" initColor="#C2C2C2"></colorSetting>
            </div>
          </li>
          <li>
            <span>输入框颜色：</span>
            <div>
              <colorSetting v-model="styles.colorInput" :originColor="styles.colorInput" initColor="#fff"></colorSetting>
            </div>
          </li>
          <li>
            <span>背景颜色：</span>
            <div>
              <colorSetting v-model="styles.colorBg" :originColor="styles.colorBg" initColor="#f7f7f7"></colorSetting>
            </div>
          </li>
          <li>
            <span>上间距：</span>
            <div>
              <edgeSetting v-model="styles.marginTop" unit="px" :max="50" :init="Number(styles.marginTop)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>下间距：</span>
            <div>
              <edgeSetting v-model="styles.marginBottom" unit="px" :max="50" :init="Number(styles.marginBottom)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>左右间距：</span>
            <div>
              <edgeSetting v-model="styles.marginLR" unit="px" :max="50" :init="Number(styles.marginLR)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>圆角：</span>
            <div>
              <edgeSetting v-model="styles.circle" unit="px" :max="15" :init="Number(styles.circle)"></edgeSetting>
            </div>
          </li>
        </ul>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>


<script>
import { mapState, mapMutations } from "vuex";
import colorSetting from "../../comm/colorSetting";
import edgeSetting from "../../comm/edgeSetting";
export default {
  name: "namelessChange",
  data() {
    return {
      activeNames1: "1",
    };
  },
  watch: {
    currentId(){
      console.log(this.styles,333)
    }
  },
  computed: {
    ...mapState(["list", "currentId"]),
    styles() {
      return this.list[this.currentId].styles;
    },
  },
  components: {
    edgeSetting,
    colorSetting,
  },
  created() {},
  methods: {},
};
</script>

<style lang="less" scoped>
@import url("../../../assets/css/base.less");
</style>
